package de.hbrs.selectionengine.optimization;

import javax.ejb.Stateless;

import de.hbrs.selectionengine.optimization.mmkp.MMKP_RHMIP;
import de.hbrs.selectionengine.optimization.mmkp.MMKP_MIP;
import de.hbrs.selectionengine.optimization.mmkp.MMKP_NAIVE;
import de.hbrs.selectionengine.optimization.mmkp.MMKP_HYBRID;
import de.hbrs.selectionengine.optimization.mmkp.MMKP_RHMIP2;
import de.hbrs.selectionengine.optimization.mmkp.MMKP_WSHEU;

@Stateless
public class SolverFactory {
	
	public ISolver createSolver(String solver) {
		
		switch (solver) {
		case "BRANCHANDBOUND":
			return new MMKP_MIP();
			
		case "HYBRID":
			return new MMKP_HYBRID();
			
		case "WSHEU":
			return new MMKP_WSHEU();
			
		case "GREEDY":
			return new MMKP_NAIVE();
		
		case "RHMIP":
			return new MMKP_RHMIP();
		case "RHMIP2":
			return new MMKP_RHMIP2();

		default:
			return new MMKP_MIP();
		}
	}
}
